package com.project.smms.service.impl;
import com.project.smms.dao.OrderMapper;
import com.project.smms.pojo.Order;
import com.project.smms.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 莫息涛
 * @Description: 订单的服务层实现类
 * @date 2020/3/6 16:25
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List<Order> selectOrder() {
        return orderMapper.selectOrder();
    }

    @Override
    public Order selectOrderById(int order_id) {
        return orderMapper.selectOrderById(order_id);
    }

    @Override
    public int addOrder(Order order) {
        return orderMapper.addOrder(order);
    }

    @Override
    public int updateOrder(Order order) {
        return orderMapper.updateOrder(order);
    }

    @Override
    public int deleteOrder(int order_id) {
        return orderMapper.deleteOrder(order_id);
    }
}
